import { get, post, put } from '@/services/api';

// 保存 AQI 反馈
export const saveAqiFeedback = async (feedback) => {
  return await post('/aqiFeedback/saveAqiFeedback', feedback);
};

// 根据电话 ID 查询 AQI 反馈
export const listAqiFeedbackByTelId = async (telId) => {
  return await post('/aqiFeedback/listAqiFeedbackByTelId', { telId });
};

// 获取反馈详情
export const getFeedbackDetailById = async (id) => {
  return await get(`/aqiFeedback/detail/${id}`);
};

// 分页查询 AQI 反馈
export const listAqiFeedbackPage = async (pageRequest) => {
  return await post('/aqiFeedback/listAqiFeedbackPage', pageRequest);
};

// 更新 AQI 反馈分配
export const updateAqiFeedbackAssign = async (feedback) => {
  return await put('/aqiFeedback/updateAqiFeedbackAssign', feedback);
};

// 根据网格成员 ID 查询 AQI 反馈
export const listAqiFeedbackByGmId = async (gmId) => {
  return await post('/aqiFeedback/listAqiFeedbackByGmId', { gmId });
};

// 更新 AQI 反馈状态
export const updateAqiFeedbackState = async (feedback) => {
  return await put('/aqiFeedback/updateAqiFeedbackState', feedback);
};